<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<div class="nav-tabs-custom">
							<ul class="nav nav-tabs">
								<li><a href="#tab-basic" data-toggle="tab" aria-expanded="false">基本信息</a></li>
								<li class="active"><a href="#tab-field" data-toggle="tab" aria-expanded="true">字段信息</a></li>
								<li><a href="#tab-gen" data-toggle="tab" aria-expanded="false">生成信息</a></li>
								<li class="pull-right header">
									<i class="fa fa-code"></i> 生成配置
								</li>
							</ul>
							<form class="form-horizontal m-t" id="signupForm">
								<div class="tab-content">
									<!-- 基本信息 -->
									<div class="tab-pane" id="tab-basic">
										<input id="tableId" name="tableId" th:value="${genTable.tableId}"  type="hidden">
										<div class="form-group">
											<label class="col-sm-3 control-label">表名称：</label>
											<div class="col-sm-8">
												<input id="tableName" name="tableName" th:value="${genTable.tableName}" class="form-control" type="text">
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-3 control-label">表描述：</label>
											<div class="col-sm-8">
												<input id="tableComment" name="tableComment" th:value="${genTable.tableComment}" class="form-control" type="text">
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-3 control-label">实体类名称：</label>
											<div class="col-sm-8">
												<input id="className" name="className" th:value="${genTable.className}" class="form-control" type="text">
											</div>
										</div>

										<div class="form-group">
											<label class="col-sm-3 control-label">生成功能作者：</label>
											<div class="col-sm-8">
												<input id="functionAuthor" name="functionAuthor" th:value="${genTable.functionAuthor}" class="form-control" type="text">
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-3 control-label">备注：</label>
											<div class="col-sm-8">
												<input id="remark" name="remark" th:value="${genTable.remark}" class="form-control" type="text">
											</div>
										</div>
									</div>

									<!-- 字段信息 -->
									<div class="tab-pane active" id="tab-field">
										<div class="select-table table-striped" style="margin-top: 0px;padding-top: 0px;padding-bottom: 0px;">
											<table id="bootstrap-table" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
										</div>
									</div>

									<!-- 生成信息 -->
									<div class="tab-pane" id="tab-gen">
										<div class="row mt20">
											<div class="col-sm-6">
												<div class="form-group">
													<label class="col-sm-4 control-label is-required">生成模板：</label>
													<div class="col-sm-8">
														<select class='form-control' id="tplCategory" name='tplCategory' style="width: 100%">
<!--															<option value="crud" th:field="*{tplCategory}">单表（增删改查）</option>-->
<!--															<option value="tree" th:field="*{tplCategory}">树表（增删改查）</option>-->
														</select>
													</div>
												</div>
											</div>
											<div class="col-sm-6">
												<div class="form-group">
													<label class="col-sm-4 control-label is-required" title="生成在哪个java包下，例如 com.ruoyi.project.system">生成包路径：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="packageName" class="form-control" type="text" placeholder="请输入生成包路径" maxlength="100" th:value="${genTable.packageName}" required>
													</div>
												</div>
											</div>
										</div>
										<div class="row">
											<div class="col-sm-6">
												<div class="form-group">
													<label class="col-sm-4 control-label is-required" title="可理解为子系统名，例如 system">生成模块名：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="moduleName" class="form-control" type="text" placeholder="请输入生成模块名" maxlength="30" th:value="${genTable.moduleName}"  required>
													</div>
												</div>
											</div>
											<div class="col-sm-6">
												<div class="form-group">
													<label class="col-sm-4 control-label is-required" title="可理解为功能英文名，例如 user">生成业务名：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="businessName" class="form-control" type="text" placeholder="请输入生成业务名" maxlength="50" th:value="${genTable.businessName}" required>
													</div>
												</div>
											</div>
										</div>
										<div class="row">
											<div class="col-sm-6">
												<div class="form-group">
													<label class="col-sm-4 control-label is-required" title="用作类描述，例如 用户">生成功能名：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="functionName" class="form-control" type="text" placeholder="请输入生成功能名" maxlength="50" th:value="${genTable.functionName}" required>
													</div>
												</div>
											</div>
											<div class="col-sm-6">
												<div class="form-group">
													<label
															class="col-sm-4 control-label is-required" title="生成文件类型，例如 999">生成文件类型：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="fileType" class="form-control" type="text" placeholder="生成文件类型" maxlength="50" th:value="${genTable.fileType}" >
													</div>
												</div>
											</div>
										</div>
										<div class="row">
											<div class="col-sm-6">
												<div class="form-group">
													<label
															class="col-sm-4 control-label is-required" title="生成审批流1是0否">生成审批流1是0否：<i class="fa fa-question-circle-o"></i></label>
													<div class="col-sm-8">
														<input name="isApply"
															   class="form-control" type="text"
															   placeholder="生成审批流1是0否"
															   maxlength="50"
															   th:value="${genTable.isApply}"
															   >
													</div>
												</div>
											</div>

										</div>
										<div class="hidden" id="otherInfo">
											<h4 class="form-header h4">其他信息</h4>
											<div class="row">
												<div class="col-sm-6">
													<div class="form-group">
														<label class="col-sm-4 control-label is-required" title="树显示的编码字段名， 如：dept_id">树编码字段：<i class="fa fa-question-circle-o"></i></label>
														<div class="col-sm-8">
															<select class='form-control' id="treeCode" name='params[treeCode]' style="width: 100%">
																<option value="">---请选择---</option>
<!--																<option th:each="column : ${table.columns}" th:text="${column.columnName + '：' + column.columnComment}" th:value="${column.columnName}" th:field="*{treeCode}"></option>-->
															</select>
														</div>
													</div>
												</div>
												<div class="col-sm-6">
													<div class="form-group">
														<label class="col-sm-4 control-label is-required" title="树显示的父编码字段名， 如：parent_Id">树父编码字段：<i class="fa fa-question-circle-o"></i></label>
														<div class="col-sm-8">
															<select class='form-control' id="treeParentCode" name='params[treeParentCode]' style="width: 100%">
																<option value="">---请选择---</option>
<!--																<option th:each="column : ${table.columns}" th:text="${column.columnName + '：' + column.columnComment}" th:value="${column.columnName}" th:field="*{treeParentCode}"></option>-->
															</select>
														</div>
													</div>
												</div>
											</div>
											<div class="row">
												<div class="col-sm-6">
													<div class="form-group">
														<label class="col-sm-4 control-label is-required" title="树节点的显示名称字段名， 如：dept_name">树名称字段：<i class="fa fa-question-circle-o"></i></label>
														<div class="col-sm-8">
															<select class='form-control' id="treeName" name='params[treeName]' style="width: 100%">
																<option value="">---请选择---</option>
<!--																<option th:each="column : ${table.columns}" th:text="${column.columnName + '：' + column.columnComment}" th:value="${column.columnName}" th:field="*{treeName}"></option>-->
															</select>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-8 col-sm-offset-3">
										<button type="submit" class="btn btn-primary">提交</button>
									</div>
								</div>
							</form>
						</div>

					</div>


				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" >
		document.write("<script type='text/javascript' src='/js/appjs/common/genTable/edit.js?r="+Math.random()+"'></s"+"cript>");
	</script>
	<script type="text/javascript" >
		document.write("<script type='text/javascript' src='/js/appjs/common/genTable/common.js?r="+Math.random()+"'></s"+"cript>");
	</script>
</body>
</html>
